package File_Visitor_18;

import File_Visitor_18.File.AudioFile;
import File_Visitor_18.File.ImageFile;
import File_Visitor_18.File.VideoFile;
import java.util.*;

public class FileApplication {
    public static void main(String[] args) {
        FileVisitor fileVisitor = new VirusScannerVisitor();

        List<AbstractFile> fileList = new ArrayList<>();
        fileList.add(new AudioFile("song.mp3"));
        fileList.add(new ImageFile("photo.jpg"));
        fileList.add(new VideoFile("movie.mp4"));

        for (AbstractFile file : fileList) {
            file.accept(fileVisitor);
        }
    }
}
